﻿using System.Configuration;
using System.Data;
using System.Net;

namespace AgileNYCWebService.Manager.Data.Table
{
	public class UserDetails:BaseClass
	{
		public UserDetails()
			: this(null)
		{

		}

		public UserDetails(DataRow row):base(row)
		{
			if (row != null)
			{
				if (row.Table.Columns.Contains("UserToken"))
					UserToken = row["UserToken"].GetString(string.Empty);
				if (row.Table.Columns.Contains("FirstName"))
					FirstName = row["FirstName"].GetString(string.Empty);
				if (row.Table.Columns.Contains("LastName"))
					LastName = row["LastName"].GetString(string.Empty);
				if (row.Table.Columns.Contains("Phone"))
					Phone = row["Phone"].GetString(string.Empty);
				if (row.Table.Columns.Contains("Title"))
					Title = row["Title"].GetString(string.Empty);
				if (row.Table.Columns.Contains("Company"))
					Company = row["Company"].GetString(string.Empty);
				if (row.Table.Columns.Contains("Site"))
					Site = row["Site"].GetString(string.Empty);
				if (row.Table.Columns.Contains("City"))
					City = row["City"].GetString(string.Empty);
				if (row.Table.Columns.Contains("State"))
					State = row["State"].GetString(string.Empty);
				if (row.Table.Columns.Contains("Info"))
					Info = row["Info"].GetString(string.Empty);
				if (row.Table.Columns.Contains("Code"))
					Code = row["Code"].GetInteger(-1);
				if (row.Table.Columns.Contains("AdditionalInfo"))
					AdditionalInfo = row["AdditionalInfo"].GetString(string.Empty);
				if (row.Table.Columns.Contains("SocialId"))
					SocialId = row["SocialId"].GetString(string.Empty);
				if (row.Table.Columns.Contains("Status"))
					Status = row["Status"].GetString(string.Empty);
				if (row.Table.Columns.Contains("FacebookId"))
					FacebookId = row["FacebookId"].GetString(string.Empty);
				if (row.Table.Columns.Contains("GooglePlusId"))
					GooglePlusId = row["GooglePlusId"].GetString(string.Empty);
				if (row.Table.Columns.Contains("LinkedInId"))
					LinkedInId = row["LinkedInId"].GetString(string.Empty);
                if (row.Table.Columns.Contains("FacebookName"))
                    FacebookName = row["FacebookName"].GetString(string.Empty);
                if (row.Table.Columns.Contains("GooglePlusName"))
                    GooglePlusName = row["GooglePlusName"].GetString(string.Empty);
                if (row.Table.Columns.Contains("LinkedInName"))
                    LinkedInName = row["LinkedInName"].GetString(string.Empty);

			}
		}

		public string UserToken { get; set; }
		public string FirstName { get; set; }
		public string LastName { get; set; }
		public string Phone { get; set; }
		public string Title { get; set; }
		public string Company { get; set; }
		public string Site { get; set; }
		public string City { get; set; }
		public string State { get; set; }
		public string Info { get; set; }
		public int Code { get; set; }
		public string AdditionalInfo { get; set; }
		public string SocialId { get; set; }
		public string Status { get; set; }
		public string FacebookId { get; set; }
		public string GooglePlusId { get; set; }
		public string LinkedInId { get; set; }

        public string FacebookName { get; set; }

        public string GooglePlusName { get; set; }

        public string LinkedInName { get; set; }
	}
}